lfs = require("lfs")

attrdir = (path)->
    for file in lfs.dir path
		-- Omitting the current and father directory
        if file != "." and file != ".."
			f = path .. '/' .. file
			attr = lfs.attributes f
		-- if is Directory, call itself to iterate subdirectories
            if attr.mode == "directory"
				attrdir(f)
		-- if is File, print attributes
			else
				for name, value in pairs attr
					print name, value

attrdir "."
